package com.itheima.chap01;

public class objectDemo {
    public static void main(String[] args) {
        // 1.创建对象
        Girl girl1 =  new Girl();
        // 2.给对象的属性赋值
        girl1.name = "小丽";
        girl1.height = 164;
        girl1.weight = 44;
        System.out.println(girl1.name);
        System.out.println(girl1.height);
        System.out.println(girl1.weight);
        // 3.调用的对象的方法
        int bmi = girl1.calculateBMI();
        System.out.println(girl1.name + "的BMI是" + bmi);

        Girl girl2 = new Girl();
        girl2.name = "娜娜";
        girl2.height = 167;
        girl2.weight = 47;
        System.out.println(girl2.name);
        System.out.println(girl2.height);
        System.out.println(girl2.weight);
        int bmi2 = girl2.calculateBMI();
        System.out.println(girl2.name + "的BMI是" + bmi2);
    }
}
